<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>流式布局</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    section {
        width: 100%;
        max-width: 980px;
        min-width: 380px;
        margin: 20px auto;
    }

    section div {
        float: left;
        width: 50%;
        height: 400px;
    }

    section div:nth-child(1) {
        background-color: pink;
    }

    section div:nth-child(2) {
        background-color: palegoldenrod;
    }
</style>

<body>
    <section>
        <div></div>
        <div></div>
    </section>
</body>

</html>